home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
hard
/
misc
/
speedramsey12a.lha
/
SpeedRamsey.doc
< prev
next >
Wrap
Text File
|
1993-08-17
|
9KB
|
210 lines
- SpeedRamsey.asm - A fifteen minutes hack - © 1993 by Holger Lubitz -
*** Sets the skip bit in the Rev G Ramsey ***
Intro
Well, I had played around with the skip bit earlier - but it took some
posts to comp.sys.amiga.hardware by people eagerly waiting for this to
convince me to release it. Isn't Usenet great ? :)
The reason I didn't release it immediately is that the fastest RAM I
could get had only 70 ns. The skip mode needs 60 ns or faster RAM for
proper function. I have only been able to test this by removing all
banks but one from my Amiga. If I have all four banks installed, this
doesn't work. Probably the additional capacitive load is enough to
slow down a signal by 1 ns, causing this to break. I don't know.
However, if you got 60 ns DRAM, you should be fine even with all four
banks populated. In my Amiga, running SpeedRamsey reduces the memory
latency as measured by AIBB 6.1 from 8.1 to 7.1, for a speed increase
of roughly 10%.
How to use it
Just start it. From Version 1.2 upwards, you can either start it from
WB or from the CLI (no interesting icon yet, sorry). You get version
information, an author notice and a short message telling you what
SpeedRamsey did, if anything. If you don't have a Rev G ramsey, it
will complain about that and do nothing.
How it works
This tiny little program is a very simple tiny little program.
However, you need to know about Ramsey to understand what it does.
Ramsey appears only in the supervisor data space. It has two
byte-wide registers, one at $DE0003 and one at $DE0043. The first one
is read-write, and this is where you configure Ramsey. The second one
is read-only, it offers version information.
Currently there are only two versions of Ramsey. The Rev G Ramsey,
which is the revision you find in all Amiga 4000s, allows you to
select a mode called skip mode. More on this later.
The older Rev D Ramsey used in the A3000 doesn't support the skip mode
this program is setting. It uses the very same bit to select memory
width. But because nobody ever used 1Mx1 DRAM in the A3000, and
probably also because bits in the only configuration register are
somewhat precious, the bit got reassigned for the skip mode in Rev G.
This makes it important to check for the right Rev of Ramsey. I don't
even want to think about the crash you'd get by setting this bit on a
Rev D Ramsey. Trying it out is certainly not recommended.
So, after we checked for Rev G by comparing with $0F (a $0D in the
version register signals a Rev D Ramsey, by the way), we fiddle with
the bit and return from the supervisor mode, having set a return code
for the rest of the program, which puts out an appropriate message
and, if started from the CLI, sets the return code (to 0 for bit set,
5 for bit reset, 15 for no Rev G Ramsey found).
Why it works and what skip mode really means
The skip mode speeds up RAM access from five clocks each to four
clocks each by skipping the last cycle. Some people call this
60-ns-mode because you need 60 ns DRAM or faster to ensure that this
works and doesn't crash your Amiga.
My own experience
You might succeed in running this with slower DRAM, depending on how
many banks you've populated and who manufactured the SIMMs you're
using. Some seem to have higher safety margins than others. In my
machine, setting the skip bit with only one bank populated (I am using
Micron 1Mx32 SIMMs with 70 ns access time) works. Setting it with all
four banks populated crashes my machine (see Intro).
You can't damage your Amiga, but be prepared for a cold reboot if it
doesn't work. Just try it - but don't have anything important in the
background when you do so. You have been warned.
Frequently asked questions
* Is the Ramsey setting permanent ?
(here was a slightly incorrect answer in earlier doc revisions because
it wasn't really thought out. Sorry for that)
No, the setting survives a reset, but has to be set manually after
each power on. You might want to put it in your User-Startup once
you're sure that your memory is fast enough. Since SpeedRamsey was
designed to toggle the bit and doesn't support parameters to set or
reset it (yet), you have to trick around a bit. Here's how:
speedramsey >nil: ; toggles the bit, sets warn if reset
if warn
speedramsey >nil: ; if reset, toggles it again
endif
I agree that this is not nice, but it works for now.
It isn't really possible to make the setting permanent (in other
words, survive a cold reboot). However, the functionality of
SpeedRamsey might get included in the OS one day, who knows (I could
imagine setting the bit, testing if the RAM still works, and resetting
it if it doesn't, but you can probably only do that from ROM or
Chipram - ah, wait, now THEREs an idea - maybe for a future version of
SpeedRamsey, right now I'm very busy updating the docs :)
* Can I damage my machine by using SpeedRamsey ?
No. At least not as far as I know. If it crashes, just switch it off
and on again.
* Does this work on my (insert specific A4000 model) ?
This should work on any A4000 with 60 ns DRAM. It doesn't matter if
you have a 030 or 040 model. Only one person with 4 banks and 60 ns
DRAM reported a crash. I'd really like to find out why.
* I have only slower DRAM - should I try it anyway ?
See question 2. Just try it out, you can't damage your machine by
doing so. If it works, fine (use a RAM test program just to be sure),
if it doesn't switch it off and archive SpeedRamsey for later use when
you've gotten faster DRAM.
Distribution
Permission for non-commercial distribution of the unmodified archive
is hereby granted. It must contain SpeedRamsey itself, its source
code SpeedRamsey.asm, this doc file SpeedRamsey.doc, the icon
SpeedRamsey.info and the questionnaire SpeedRamsey.survey, and _only_
those (_no_ stupid .displaymes in archives with my software!) Fred
Fish is explicitly allowed to include this in his library.
If you release anything based on this source, please give credit.
Bugs, Suggestions, etc.
You can contact me electronically by using my eMail-Address
hal@caty.north.de. If you don't have eMail yet, get access to it or
lose. After all, we are in the nineties now, aren't we ?
History
1.0 (12-Aug-1993) First Usenet release
The original SpeedRamsey. Size of program: 72 bytes.
1.1 (13-Aug-1993) Second Usenet release
Mainly updated docs because of questions I got by eMail.
Also made program slightly shorter, SpeedRamsey now checks for Rev G
and only sets the bit on Rev G. It used to do so on any Non-Rev-D
Ramsey, but who knows what this bit will do in the future ? Optimised
code slightly when changing this.
The bit is now flipped instead of set. Running SpeedRamsey again
resets the system to the old state. However, you still have no
indication what happened other than checking by running AIBB or
similar. I really need to put in messages soon :)
Size of program: 68 bytes. (Isn't assembler great ?)
(14-Aug-1993) Not released
Well, I just _had_ to include the messages. Now SpeedRamsey tells you
what it did. It even tells you if you haven't got a Rev G Ramsey.
Also added WB startup code that opens an own window to write into.
Size of program with text and startup stuff: Still only 396 bytes,
but pretty large compared to 1.1 - additional comfort has its price :)
(15-Aug-1993) Not released
Slight changes to the documentation
1.2 (16-Aug-1993) Third (and last) Usenet Release
Updated FAQ list. Some more doc changes. Added questionnaire because
one person reported a crash with 60 ns DRAM. Please fill it out and
return it, regardless if SpeedRamsey worked for you or not. I need
that information to find out under which conditions SpeedRamsey is
safe and under which it is not.
1.2a (17-Aug-1993) First Aminet Release
Corrected FAQ list. The first answer was not totally correct and
could be misunderstood, too. Also offers a workaround for putting
SpeedRamsey into the User-Startup now.
SpeedRamsey now contains version information, which increased its size
slightly. Size of program: 408 bytes.
To do list
Parameters for explicit setting/resetting of the skip mode bit
function check if possible (I'll have to look into this)
maybe setting/resetting the other Ramsey bits.